/*
 * Transaction.h
 *
 *  Created on: Apr 12, 2010
 *      Author: Sequoyha
 */

#ifndef TRANSACTION_H_
#define TRANSACTION_H_

#include "Winery.h"
#include<fstream>

//Struct for tracking purchases
struct Purchase
{
	string item;	//Item being purchased
	int quantity;	//Number of items being purchased
	float total;	//Total of item purchased (*qty)
	float price;	//Price of item being purchased
	Purchase* next;	//Pointer for linked list
};

class Transaction
{
public:
	//CONSTRUCTORS------------------------------------------
	Transaction();
	Transaction(Winery);
	//FUNCTIONS--------------------------------------------
	void addSale(int, int);
	void PrintSales();
	float getGrandTotal();
private:
	Purchase* head;
	float grandTotal;
	Winery currentWinery;
};
#endif /* TRANSACTION_H_ */

//Create a transaction object for each winery visited.
/*Make a linked list of transaction information that can be
 * referenced when making final receipt
 */
